<br /><br />
<script>var js_url="<?php echo $base_url?>";</script>
<script type="text/javascript" src="<?php echo $base_url;?>style/js/BE/admin_news.js"></script>
<script type="text/javascript" src="<?php echo $base_url;?>style/js/BE/admin_news_auto.js"></script>
<script type="text/javascript" src="<?php echo $base_url;?>style/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
  function InsertCustoms(){
    
    if($("#cbo_customs_cate").val() == ""){
      alert("Vui lòng chọn danh mục thủ tục");
      $("#cbo_customs_cate").focus();
    }
    else if($("#txt_title").val() == ""){
      alert("Vui lòng nhập tên thủ tục");
      $("#txt_title").focus();
    }
    else if($("#cboManager").val() == "0"){
      alert("Vui lòng chọn cơ quan thực hiện");
      $("#cboManager").focus();
    }
    else if($("#txtDV").val() == ""){
      alert("Vui lòng nhập mức DV");
      $("#txtDV").focus();
    }
    else{
      $("#trueform2").submit();
    }
  }
</script>

<form name="trueform2" id="trueform2" method="POST" action="<?php echo $base_url;?>admin_customs_procedures/<?php echo $pagePost; ?>">
<table width="80%" border="0" cellspacing="1" cellpadding="0" align="center" style="margin:auto; background-color:#3D84CC;">
  <tr>
    <td colspan="2" align="left" bgcolor="#3D84CC" class="title3">&nbsp;Cập nhật <?php echo $page_title;?></td>
  </tr>
  <tr>
    <td align="right" bgcolor="#FFFFFF" class="title2"><span class="star">*</span>&nbsp;Danh mục thủ tục:</td>
    <td align="left" bgcolor="#FFFFFF" class="title2">
	  	<select name="cbo_customs_cate" id="cbo_customs_cate">
      	<option value="">-- Chọn --</option>
        <?php 
        foreach($listCate as $key => $item){
          if($item->cate_id == $cateSelected){
            echo "<option value='" . $item->cate_id . "' selected>" . $item->cate_name . "</option>";
          }
          else{
            echo "<option value='" . $item->cate_id . "'>" . $item->cate_name . "</option>";
          }
          $i++;
        }
        ?>          
      </select>    
    </td>
  </tr>       
  <tr>
    <td align="right" bgcolor="#FFFFFF" class="title2"><span class="star">*</span>&nbsp;Tên thủ tục:</td>
    <td align="left" bgcolor="#FFFFFF" class="title2">
		<input type="text" name="txt_title" id="txt_title" class="text2" style="width:650px;" value="<?php echo $customsTitle;?>" />     
    </td>
  </tr>
  <tr>
    <td align="right" bgcolor="#FFFFFF" class="title2">&nbsp;Cơ quan thực hiện</td>
    <td align="left" bgcolor="#FFFFFF" class="title2">
      <select name="cboManager" id="cboManager">
        <option value="0"> -- Chọn cơ quan thực hiện -- </option>
        <?php
        foreach ($customsManager as $key => $value) {
          if($key == $selected){
            echo "<option value=" . $key . " selected>" . $value . "</option>";
          }
          else{
            echo "<option value=" . $key . ">" . $value . "</option>"; 
          }
        }
        ?>
      </select>    
    </td>
  </tr> 
  <tr>
    <td align="right" bgcolor="#FFFFFF" class="title2">&nbsp;Mức DV</td>
    <td align="left" bgcolor="#FFFFFF" class="title2">
      <input type="text" name="txtDV" id="txtDV" value="<?php echo $customsDV; ?>" />
    </td>
  </tr>     
  <tr id="tr_noi_dung_chi_tiet">
    <td align="right" bgcolor="#FFFFFF" class="title2">Nội dung</td>
    <td align="left" bgcolor="#FFFFFF" class="title2">
	  <textarea class="ckeditor" cols="10" id="txt_content" name="txt_content" rows="2">
		<?php echo $newsFullDesc;?>
	  </textarea>
    </td>
  </tr>
      <td colspan="2" style="text-align:center;" bgcolor="#FFFFFF" height="30px">
		    <input type="button" name="btnInsert" id="btnInsert" style="width:70px;" class="button" onclick="InsertCustoms();" value="Thực hiện" />
	   </td>
  </tr>
</table>
<input type="hidden" name="isPost" value="isPost" />
</form>